<layout name="layout" />
	<div class="col-md-12">
		<div class="panel-body">
			<foreach name="rule" item="v">
			<form class="form-horizontal" action="__CONTROLLER__/editRuleHandle" method="post">
				<div class="form-group">
					<label for="ruleTitle" class="col-sm-2 control-label">规则简述:</label>
					<div class="col-sm-5">
						<input type="text" value="{$v.title}" class="form-control"  name="title" id="ruleTitle">
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>						

				<div class="form-group">
					<label for="ruleName" class="col-sm-2 control-label">规则标识:</label>
					<div class="col-sm-5">
						<input type="text" value="{$v.name}" class="form-control" name="name" id="ruleName">
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>

				<div class="form-group">
					<label for="condition" class="col-sm-2 control-label">附加条件:</label>
					<div class="col-sm-5">
						<input type="text" value="{$v.condition}"  class="form-control" placeholder="附加条件" name="condition" id="condition">
						
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label">是否启用:</label>
					<div class="btn-group col-sm-5" data-toggle="buttons">
						<label class="btn btn-primary <if condition="$v.status eq 1">active</if>" >
							<input type="radio" name="status" id="status" value="1"<if condition="$v.status eq 1">checked="checked"</if>>启用
						</label>

						<label class="btn btn-danger <if condition="$v.status eq 0">active</if>" >
							<input type="radio" name="status" id="status" value="0"<if condition="$v.status eq 0">checked="checked"</if>>禁用
						</label>
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>

				<div class="form-group">
					<label for="modules" class="col-sm-2 control-label">所属模块:</label>
					<div class="col-sm-3">
						<select class="form-control" name="mid">
							<foreach name="module" item="c">
								<option value="{$c.id}"<if condition="$v['mid'] eq $c['id']">selected="selected"</if>>{$c.module_name}</option>
							</foreach>
						</select>
					</div>
					<label class="col-sm-2 control-label"></label>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-5">
						<input type="hidden" name="id" value="{$v.id}">
						<button type="submit" class="btn btn-success btn-add">添加</button>
					</div>
					
				</div>
			</form>
			</foreach>
		</div>		
	</div>
</div>
			